﻿using Avalonia;
using Avalonia.Media.Imaging;
using Avalonia.ReactiveUI;
using LightCAD;
using LightCAD.UI;
using System;
using System.Drawing;
using System.Drawing.Imaging;
using System.Runtime.InteropServices;

namespace LightCAD.Windows
{
     
    internal class Program
    {
        // Initialization code. Don't use any Avalonia, third-party APIs or any
        // SynchronizationContext-reliant code before AppMain is called: things aren't initialized
        // yet and stuff might break.
        [STAThread]
        public static void Main(string[] args) => BuildAvaloniaApp()
            .StartWithClassicDesktopLifetime(args);

        // Avalonia configuration, don't remove; also used by visual designer.
        public static AppBuilder BuildAvaloniaApp()
        {
            var cfg = AppBuilder.Configure<App>()
               .UsePlatformDetect()
               .UseReactiveUI()
               .LogToTrace();

            if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows))
            {
                cfg.With(new Win32PlatformOptions() { UseWgl = true });
            }
            else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX))
            {
               
            }
            return cfg;
        }
            
         
    }
}